<?
	$this->load->helper('form');
?>

	<script type="text/javascript" src="//code.jquery.com/jquery-1.9.1.js"></script>
	<script src="http://code.highcharts.com/highcharts.js"></script>
	<script src="http://code.highcharts.com/highcharts-more.js"></script>
	<script src="http://code.highcharts.com/modules/exporting.js"></script>
</head>
<body>
<div id="container" >
<h1 class="header">异常限设置</h1>
<div id="body">
	<table>
		<tr>
			<td>
				<div id="cost" style="height: 500px; margin: 10px; min-width: 250px; max-width: 300px">
				<script type="text/javascript">
				$(function () {
	    $('#cost').highcharts({

		    chart: {
		        type: 'boxplot'
		    },
		    
		    navigation: {
		    	buttonOptions : {
			    	enabled: false
			    }
		    },

		    credits: {
		    	enabled: false
		    },

		    title: {
		        text: '全国范围: 设施栽培'
		    },
		    
		    legend: {
		        enabled: false
		    },
		
		    xAxis: {
		        categories: ['总成本','总产值'],
		        title: {
		        	text: '样本量: 21'
		        }
		    },
		    
		    yAxis: {
		        title: {
		            text: '单位：元 / 亩'
		        },

		        max: 42000,

		        plotLines: [{
		        	value: 40751,
		        	color: 'red',
		        	width: 1,
		        	label: {
		        		text: '总产值限: 40751',
		        		align: 'right',
		        		style: {
		        			color: 'gray'
		        		}
		        	}
		        }, {
		        	value: 16333,
		        	color: 'red',
		        	width: 1,
		        	zIndex: 5,
		        	label: {
		        		text: '总成本限: 16333',
		        		align: 'left',
		        		style: {
		        			color: 'gray'
		        		}
		        	}
		        }
		        ]
		    },
		
		    series: [{
		        name: '特征参数',
		        data: [
		            [5129, 6253, 7785, 8773, 8993],
		            [10730, 13074, 18953, 24145, 33074]
		        ],
		        tooltip: {
		            headerFormat: '<em>{point.key}</em><br/>'
		        }
		    }, {
		        name: '异常值',
		        color: Highcharts.getOptions().colors[0],
		        type: 'scatter',
		        data: [ // x, y positions where 0 is the first category
		            [0, 12541],
		            [0, 12896],
		            [0, 12582],
		            [1, 35790]
		        ],
		        marker: {
		            fillColor: 'white',
		            lineWidth: 1,
		            lineColor: Highcharts.getOptions().colors[0]
		        },
		        tooltip: {
		            pointFormat: '{point.y}'
		        }
		    }]
		
		});
				});
				</script>
				</div>
			</td>
			<td>
				<? echo form_open('acceptance'); ?>
					<p> 当前 <u>总成本</u> 异常限为 <b> <? echo $qa['acceptance']; ?></b>
						<? 
							$input_acceptance = array (
								'name' => 'input_acceptance',
								'value' => trim(set_value('input_acceptance')),
								'size' => '10',
								'class' => '',
								'id' => 'acceptance_input'
							);
							echo form_input('input_acceptance'); ?></p>
			</td>
		</tr>
	</table>
	<div id="debug-info" style="display:none;">
		<pre>$qa = 
<? print_r($qa); ?>
		</pre>
	</div>
</div>